/*
 * File: Fu_Dummy.c
 *
 * Code generated for Simulink model 'Fu_Dummy'.
 *
 * Model version                  : 1.309
 * Simulink Coder version         : 8.2 (R2012a) 29-Dec-2011
 * TLC version                    : 8.2 (Dec 29 2011)
 * C/C++ source code generated on : Sun Apr 28 19:56:48 2013
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: ARM Compatible->ARM Cortex
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#include "Fu_Dummy.h"
#include "Fu_Dummy_private.h"

/* Exported block signals */
uint16_T RAO_AngAbs;                   /* '<S1>/Memory' */

/* Block states (auto storage) */
D_Work_Fu_Dummy Fu_Dummy_DWork;

/* Real-time model */
RT_MODEL_Fu_Dummy Fu_Dummy_M_;
RT_MODEL_Fu_Dummy *const Fu_Dummy_M = &Fu_Dummy_M_;

/* Model step function */
void Fu_Dummy_step(void)
{
  /* Memory: '<S1>/Memory' */
  RAO_AngAbs = Fu_Dummy_DWork.Memory_PreviousInput;

  /* Switch: '<S1>/Switch' incorporates:
   *  RelationalOperator: '<S1>/Relational Operator'
   */
  if (62832 <= RAO_AngAbs) {
    /* Update for Memory: '<S1>/Memory' incorporates:
     *  Constant: '<S1>/Constant6'
     */
    Fu_Dummy_DWork.Memory_PreviousInput = 0U;
  } else {
    /* Update for Memory: '<S1>/Memory' incorporates:
     *  Update for Inport: '<Root>/In1'
     *  Sum: '<S1>/Add'
     */
    Fu_Dummy_DWork.Memory_PreviousInput = (uint16_T)((uint32_T)FuDmy_AngleVeloc
      + (uint32_T)RAO_AngAbs);
  }

  /* End of Switch: '<S1>/Switch' */
}

/* Model initialize function */
void Fu_Dummy_initialize(void)
{
  /* Registration code */

  /* initialize error status */
  rtmSetErrorStatus(Fu_Dummy_M, (NULL));

  /* block I/O */

  /* exported global signals */
  RAO_AngAbs = 0U;

  /* states (dwork) */
  (void) memset((void *)&Fu_Dummy_DWork, 0,
                sizeof(D_Work_Fu_Dummy));
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
